Imaging device and electronic device

ABSTRACT

The imaging device can retain analog data (image data) obtained by an image-capturing operation in a pixel and perform a product-sum operation of the analog data and a predetermined weight coefficient in the pixel to convert the data into binary data. When the binary data is taken in a neural network or the like, processing such as image recognition can be performed. Since enormous volumes of image data can be retained in pixels in the state of analog data, processing can be performed efficiently.

TECHNICAL FIELD

One embodiment of the present invention relates to an imaging device.

Note that one embodiment of the present invention is not limited to theabove technical field. The technical field of one embodiment of theinvention disclosed in this specification and the like relates to anobject, a method, or a manufacturing method. Another one embodiment ofthe present invention relates to a process, a machine, manufacture, or acomposition of matter. Thus, more specifically, a semiconductor device,a display device, a liquid crystal display device, a light-emittingdevice, a lighting device, a power storage device, a memory device, animaging device, a driving method thereof, or a manufacturing methodthereof can be given as an example of the technical field of oneembodiment of the present invention disclosed in this specification.

Note that in this specification and the like, a semiconductor devicegenerally means a device that can function by utilizing semiconductorcharacteristics. A transistor and a semiconductor circuit areembodiments of semiconductor devices. Furthermore, in some cases, amemory device, a display device, an imaging device, or an electronicdevice includes a semiconductor device.

BACKGROUND ART

A technique which forms a transistor by using an oxide semiconductorthin film formed over a substrate has attracted attention. An imagingdevice having a structure where a transistor including an oxidesemiconductor with an extremely low off-state current is used in a pixelcircuit is disclosed in Patent Document 1, for example.

A technique which adds an arithmetic function to an imaging device isdisclosed in Patent Document 2.

REFERENCES

-   [Patent Document 1] Japanese Published Patent Application No.    2011-119711-   [Patent Document 2] Japanese Published Patent Application No.    2016-123087

SUMMARY OF THE INVENTION Problems to be Solved by the Invention

With the technological development, a high-quality image can be easilycaptured by an imaging device provided with a solid-state imagingelement such as a CMOS image sensor. In the next generation, an imagingdevice is required to be equipped with more intelligent functions.

In the present image data compression, image recognition, or the like,image data (analog data) is converted into digital data, taken out, andthen subjected to processing. If the processing can be carried out inthe imaging device, higher-speed communication with an external deviceis achieved, improving user's convenience. Furthermore, load onperipheral devices or power consumption thereof can be reduced.Moreover, if complicated data processing is performed in analog datastate, time required for data conversion can be shortened.

Thus, an object of one embodiment of the present invention is to providean imaging device capable of image processing. Another object is toprovide an imaging device capable of recognition of obtained image data.Another object is to provide an imaging device capable of compression ofobtained image data.

Another object is to provide an imaging device with low powerconsumption. Another object is to provide an imaging device capable ofhigh-sensitivity image capturing. Another object is to provide animaging device with high reliability. Another object is to provide anovel imaging device or the like. Another object is to provide a methodfor driving the above imaging device. Another object is to provide anovel semiconductor device or the like.

Note that the descriptions of these objects do not disturb the existenceof other objects. One embodiment of the present invention does not needto achieve all of these objects. Other objects will be apparent from andcan be derived from the description of the specification, the drawings,the claims, and the like.

Means for Solving the Problems

One embodiment of the present invention relates to an imaging devicewhich can retain data in a pixel and perform arithmetic processing onthe data.

One embodiment of the present invention is an imaging device whichincludes a pixel block, a first circuit, and a second circuit. The pixelblock includes a plurality of pixels and a third circuit. The pixels andthe third circuit are electrically connected to each other through afirst wiring. The pixels have a function of obtaining a first signal byphotoelectric conversion. The pixels have a function of multiplying thefirst signal by a predetermined multiplication factor to generate secondsignals and outputting the second signals to the first wiring. The thirdcircuit has a function of calculating a sum of the second signals outputto the first wiring to generate a third signal and outputting the thirdsignal to the first circuit. The first circuit binarizes the thirdsignal to generate a fourth signal and outputs the fourth signal to thesecond circuit.

The second circuit can have a function of performing parallel-serialconversion on the fourth signal. Alternatively, the second circuit mayinclude a neural network which uses the fourth signal as input data.

It is preferable that the plurality of pixels be arranged in a matrixand any one column be shielded from light.

The following structure is possible: the pixels include a photoelectricconversion element, a first transistor, a second transistor, a thirdtransistor, a fourth transistor, and a first capacitor; one electrode ofthe photoelectric conversion element is electrically connected to one ofa source and a drain of the first transistor; the other of the sourceand the drain of the first transistor is electrically connected to oneof a source and a drain of the second transistor; one of a source and adrain of the second transistor is electrically connected to a gate ofthe third transistor; the gate of the third transistor is electricallyconnected to one electrode of the first capacitor; one of a source and adrain of the third transistor is electrically connected to the firstwiring; the other electrode of the first capacitor is electricallyconnected to one of a source and a drain of the fourth transistor; andthe first and second transistors include a metal oxide in their channelformation regions.

The pixels may further include a fifth transistor and a sixthtransistor, where a gate of the fifth transistor is electricallyconnected to the gate of the third transistor and one of a source and adrain of the fifth transistor is electrically connected to one of asource and a drain of the sixth transistor.

It is preferable that the third and fourth transistors include siliconin their channel formation regions.

The following structure is possible: the third circuit includes acurrent supply circuit, a seventh transistor, an eighth transistor, aninth transistor, a second capacitor, and a resistor; the current supplycircuit is electrically connected to the first wiring; the first wiringis electrically connected to one electrode of the second capacitor; theone electrode of the second capacitor is electrically connected to oneelectrode of the resistor; the other electrode of the second capacitoris electrically connected to one of a source and a drain of the seventhtransistor; the one of the source and the drain of the seventhtransistor is electrically connected to a gate of the eighth transistor;and one of a source and a drain of the eighth transistor is electricallyconnected to one of a source and a drain of the ninth transistor.

It is preferable that the seventh to ninth transistors include siliconin their channel formation regions.

It is preferable that the metal oxide include In, Zn, and M (M is Al,Ti, Ga, Sn, Y, Zr, La, Ce, Nd, or Hf).

It is preferable that the photoelectric conversion element includeselenium or a compound containing selenium.

Effect of the Invention

With one embodiment of the present invention, an imaging device capableof image processing can be provided. Alternatively, an imaging devicecapable of recognition of obtained image data can be provided.Alternatively, an imaging device capable of compression of obtainedimage data can be provided.

Alternatively, an imaging device with low power consumption can beprovided. Alternatively, an imaging device capable of high-sensitivityimage capturing can be provided. Alternatively, an imaging device withhigh reliability can be provided. Alternatively, a novel imaging deviceor the like can be provided. Alternatively, a method for driving theabove imaging device can be provided. Alternatively, a novelsemiconductor device or the like can be provided.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 A block diagram illustrating an imaging device.

FIG. 2 A diagram illustrating a pixel block 200.

FIG. 3 A diagram illustrating a pixel 100 and a reference pixel 150.

FIG. 4 Diagrams illustrating reference pixels 150.

FIG. 5 Diagrams illustrating a current supply circuit 210.

FIG. 6 A timing chart illustrating an operation of the pixel block 200.

FIG. 7 Diagrams illustrating a pixel 100 and pixel blocks 200.

FIG. 8 Diagrams explaining signals output by the pixel blocks 200 andsignals output by a circuit 302.

FIG. 9 A diagram illustrating the circuit 302 (neural network).

FIG. 10 A diagram illustrating pixels included in the circuit 302.

FIG. 11 Diagrams illustrating a structure example of a neural network.

FIG. 12 Diagrams illustrating a circuit 301 and the pixel 100.

FIG. 13 Diagrams illustrating structures of a pixel in an imagingdevice.

FIG. 14 Diagrams illustrating structures of a pixel in an imagingdevice.

FIG. 15 Diagrams illustrating structures of a pixel in an imagingdevice.

FIG. 16 Diagrams illustrating structures of a pixel in an imagingdevice.

FIG. 17 Diagrams illustrating structures of a pixel in an imagingdevice.

FIG. 18 Perspective views of packages and modules in which imagingdevices are placed.

FIG. 19 Diagrams illustrating electronic devices.

FIG. 20 A diagram illustrating a pixel circuit.

FIG. 21 A block diagram of a pixel array.

FIG. 22 A graph showing calculation results.

FIG. 23 A diagram showing weight coefficients input to pixels.

FIG. 24 A graph explaining the output of pixels.

FIG. 25 An image used for pattern extraction and diagrams showing weightcoefficients input to pixels.

FIG. 26 Diagrams illustrating pattern extraction results.

MODE FOR CARRYING OUT THE INVENTION

Embodiments will be described in detail with reference to the drawings.Note that the present invention is not limited to the followingdescription, and it will be readily understood by those skilled in theart that modes and details of the present invention can be modified invarious ways without departing from the spirit and scope. Therefore, thepresent invention should not be interpreted as being limited to thedescription of embodiments below. Note that in structures of theinvention described below, the same reference numerals are used, indifferent drawings, for the same portions or portions having similarfunctions, and description thereof is not repeated in some cases. Notethat the hatching of the same element that constitutes a drawing isomitted or changed in different drawings in some cases.

Embodiment 1

In this embodiment, an imaging device which is one embodiment of thepresent invention will be described with reference to drawings.

One embodiment of the present invention is an imaging device having anadditional function such as image recognition. The imaging device canretain analog data (image data) obtained by an image-capturing operationin a pixel and extract binary data from data that is obtained bymultiplying the analog data by a predetermined weight coefficient.

When the binary data is taken in a neural network or the like,processing such as image recognition can be performed. Since enormousvolumes of image data can be retained in pixels in the state of analogdata, processing can be performed efficiently.

FIG. 1 is a block diagram illustrating an imaging device of oneembodiment of the present invention. The imaging device includes a pixelarray 300, circuits 301, a circuit 302, a circuit 303, a circuit 304,and a circuit 305. Note that the structures of the circuits 301 to thecircuit 305 are not limited to single circuits and may consist of aplurality of circuits.

The pixel array 300 includes a plurality of pixel blocks 200. The pixelblocks 200 include a plurality of pixels arranged in a matrix and acircuit 201 as illustrated in FIG. 2.

Of the plurality of pixels, pixels in any one column are referencepixels 150, and the others are pixels 100. The pixels 100 can obtainimage data, and the reference pixels 150 can output signals at the timeof reset. Note that the number of pixels is 2×3 in an exampleillustrated in FIG. 2 but is not limited to this. It should be notedthat the reference pixels are preferably provided for the number ofrows.

The pixel blocks 200 operate as product-sum operation circuits, and thecircuit 201 has a function of extracting the product of image data andweight coefficients from signals output from the pixels 100 and thereference pixels 150.

As illustrated in FIG. 3, the pixel 100 can include a photoelectricconversion element 101, a transistor 102, a transistor 103, a capacitor104, a transistor 105, and a transistor 106. Furthermore, the referencepixel 150 can also have an almost similar structure. The pixel 100 ismainly described below, and as for the reference pixel 150, onlyportions different from those of the pixel 100 are described.

One electrode of the photoelectric conversion element 101 iselectrically connected to one of a source and a drain of the transistor102. The other of the source and the drain of the transistor 102 iselectrically connected to one of a source and a drain of the transistor103. The one of the source and the drain of the transistor 103 iselectrically connected to one electrode of the capacitor 104. The oneelectrode of the capacitor 104 is electrically connected to a gate ofthe transistor 105. The other electrode of the capacitor 104 iselectrically connected to one of a source and a drain of the transistor106.

The other electrode of the photoelectric conversion element 101 iselectrically connected to a wiring 114. A gate of the transistor 102 iselectrically connected to a wiring 116. The other of the source and thedrain of the transistor 103 is electrically connected to a wiring 115. Agate of the transistor 103 is electrically connected to a wiring 117.One of a source and a drain of the transistor 105 is electricallyconnected to a wiring 113. The other of the source and the drain of thetransistor 105 is electrically connected to a GND wiring or the like.The other of the source and the drain of the transistor 106 iselectrically connected to a wiring 111 a. A gate of the transistor 106is electrically connected to a wiring 112.

The reference pixel 150 is different from the pixel 100 in that theother of the source and the drain of the transistor 106 is electricallyconnected to a wiring 111 b and that the one of the source and the drainof the transistor 105 is electrically connected to a wiring 153.

Here, an electrical connection point of the other of the source and thedrain of the transistor 102, the one of the source and the drain of thetransistor 103, the one electrode of the capacitor 104, and the gate ofthe transistor 105 is referred to a node N.

The wirings 114 and 115 can have a function of a power supply line. Forexample, the wiring 114 can function as a high potential power supplyline, and the wiring 115 can function as a low potential power supplyline. The wirings 112, 116, and 117 can function as signal lines whichcontrol the electrical conduction of the respective transistors. Thewirings 111 a and 111 b can function as signal lines for supplying apotential corresponding to a weight coefficient to the pixels 100. Thewiring 113 can function as a wiring for electrically connecting thepixel 100 and the circuit 201. The wiring 153 can function as a wiringfor electrically connecting the reference pixel 150 and the circuit 201.

Note that an amplifier circuit or a gain control circuit may beelectrically connected to the wiring 113.

As the photoelectric conversion element 101, a photodiode can be used.In order to increase the light detection sensitivity under lowilluminance conditions, an avalanche photodiode is preferably used.

Since signal generation is conducted without a contribution of thephotoelectric conversion element 101 in the reference pixels 150, alight-shielding layer 151 is preferably provided over the referencepixels 150 as illustrated in FIG. 4(A). Alternatively, as illustrated inFIG. 4(B), a structure not provided with the photoelectric conversionelement 101 may be employed. Alternatively, the structure illustrated inFIG. 3 may be used in the state where the transistor 103 keeps beingelectrically conducted (reset state).

The transistor 102 can have a function of controlling the potential ofthe node N. The transistor 103 can have a function of initializing thepotential of the node N. The transistor 105 can have a function ofcontrolling a current fed by the circuit 201 depending on the potentialof the node N. The transistor 106 can have a function of supplying apotential corresponding to a weight coefficient to the node N.

In the case where an avalanche photodiode is used as the photoelectricconversion element 101, a high voltage needs to be applied andtransistors which withstand a high voltage are preferably used as thetransistors connected to the photoelectric conversion element 101. Asthe transistors which withstand a high voltage, transistors including ametal oxide in channel formation regions (hereinafter referred to as OStransistors) or the like can be used, for example. Specifically, OStransistors are preferably used as the transistor 102 and the transistor103.

Moreover, the OS transistors also have features of an extremely lowoff-state current. When OS transistors are used as the transistors 102and 103, the charge retention period at the node N can be elongatedgreatly. Therefore, a global shutter system in which a chargeaccumulation operation is performed in all the pixels at the same timecan be used without complicating the circuit configuration and operationmethod. Furthermore, while image data is retained at the node N,calculation using the image data can be performed a plurality of times.

It is desired that the transistor 105 have excellent amplifyingcharacteristics. The transistor 106 is preferably a transistor having ahigh mobility capable of high-speed operation because the transistor 106is repeatedly turned on and off at frequent intervals. Accordingly,transistors using silicon in their channel formation regions(hereinafter, Si transistors) are preferably used as the transistors 105and 106.

Note that without limitation to the above, an OS transistor and a Sitransistor may be freely used in combination. Furthermore, all thetransistors may be either OS transistors or Si transistors.

The potential of the node N in the pixel 100 is determined by capacitivecoupling between a potential obtained by adding a reset potential and apotential (image data) generated by photoelectric conversion by thephotoelectric conversion element 101 and the potential corresponding toa weight coefficient supplied from the wiring 111 a. That is, a signaloutput by the transistor 105 includes the product of the image data andthe given weight coefficient.

The potential of the node N in the reference pixel 150 is determined bycapacitive coupling between a reset potential supplied from the wiring115 and the potential corresponding to a weight coefficient suppliedfrom the wiring 111 b.

As illustrated in FIG. 2, the pixels 100 are electrically connected toeach other by the wiring 113, and the reference pixels 150 areelectrically connected to each other by the wiring 153. Thus, thecircuit 201 performs calculation with the use of a sum of signals outputby the transistors 105 of the pixels 100 and a sum of signals output bythe transistors 105 of the reference pixels 150.

The circuit 201 includes a current source circuit 210, a capacitor 202,a transistor 203, a transistor 204, a transistor 205, a transistor 206,and a resistor 207.

The current source circuit 210 is electrically connected to oneelectrode of the capacitor 202. The other electrode of the capacitor 202is electrically connected to one of a source and a drain of thetransistor 203. The other of the source and the drain of the transistor203 is electrically connected to a gate of the transistor 204. One of asource and a drain of the transistor 204 is electrically connected toone of a source and a drain of the transistor 205. The one of the sourceand the drain of the transistor 205 is electrically connected to one ofa source and a drain of the transistor 206. One electrode of theresistor 207 is electrically connected to the one electrode of thecapacitor 202.

The current source circuit 210 is electrically connected to the wiring113 and the wiring 153. The other of the source and the drain of thetransistor 203 is electrically connected to a wiring 218. The other ofthe source and the drain of the transistor 204 is electrically connectedto a wiring 219. The other of the source and the drain of the transistor205 is electrically connected to a reference power supply line such as aGND wiring. The other of the source and the drain of the transistor 206is electrically connected to a wiring 212. The other electrode of theresistor 207 is electrically connected to a reference power supply linesuch as a GND wiring.

The wiring 219 can have a function of a power supply line. For example,the wiring 219 can function as a high potential power supply line. Thewiring 218 can have a function of a wiring for supplying a potentialdedicated to reading. The wirings 213, 214, 215, and 216 can function assignal lines which control the electrical conduction of the respectivetransistors.

The transistor 203 can have a function of resetting the potential of thewiring 211 to a potential of the wiring 218. The transistors 204 and 205can function as source follower circuits. The transistor 206 can have afunction of selecting the pixel block 200.

The current source circuit 210 can have a structure illustrated in FIG.5(A), for example. The structure of FIG. 5(A) uses n-channeltransistors, where the output side of a transistor 253 is electricallyconnected to a gate of a transistor 254, a drain of the transistor 254,and a gate of a transistor 224. With this structure, the transistor 254and the transistor 224 operate as a current mirror circuit. Arbitrarysignal potentials are supplied to signal lines FG and FGREF, and whenthe wiring 214 is at “H”, a constant current can be supplied to thewiring 113 and the wiring 153. As the transistors in this structure,either or both of OS transistors and Si transistors can be used.

Note that a circuit 220 included in the current source circuit 210 mayhave a structure using p-channel transistors as illustrated in FIG.5(B), where the output side of a transistor 262 is electricallyconnected to a gate of the transistor 262 and a gate of a transistor261. In this structure, Si transistors are preferably used as thetransistors 261 and 262.

The circuit 201 can eliminate offset components other than the productof image data (potential X) and a weight coefficient (potential W) andextract the objective WX. The following is a WX extraction process inthe case of using the circuit illustrated in FIG. 5(A) as the currentsource circuit 210.

First, in the circuit 201, the transistor 203 is brought into aconduction state so that a potential Vr is written from the wiring 218to a wiring 211. Here, the potential Vr is a reference potential usedfor a reading operation.

At this time, it is assumed that the potential X is written to the nodeN of the pixel 100 by photoelectric conversion. In addition, weightcoefficients written from the wirings 111 a and 111 b are assumed to be0.

Accordingly, the sum of currents (IREF) which flow through the referencepixels 150 becomes kΣ(0−V_(th))². Here, k is a constant and V_(th) isthe threshold voltage of the transistor 105.

A current ICM₀ (ICM when the weight is 0) which flows through thecurrent source circuit 210 is represented as follows: ICM₀=ICREF₀ (ICREFwhen the weight is 0)−kΣ(0−V_(th))².

The sum of currents (Ip) which flow through the pixels 100 becomeskΣ(X−V_(th))².

A current IR₀ (IR when the weight is 0) which flows through the resistor207 is represented as follows: IR₀=IC−ICM₀−kΣ(X−V_(th))². This meansIR₀=IC−ICREF₀+Σ(0−V_(th))²−kΣ(X−V_(th))².

Then, the transistor 203 is brought into a non-conduction state, so thatthe potential Vr is retained in the wiring 211. After that, weightcoefficients W are written to the pixels 100 and the reference pixels150 from the wirings 111 a and 111 b.

At this time, the sum of currents (IREF) which flow through thereference pixels 150 is kΣ(W−V_(th))².

The sum of currents (Ip) which flow through the pixels 100 iskΣ(W+X−V_(th))².

The current IR which flows through the resistor 207 is represented asfollows: IR=IC−ICM−kΣ(W+X−V_(th))². This meansIR=IC−ICREF+kΣ(W−V_(th))²−kΣ(W+X−V_(th))².

Here, the difference between IR₀ and IR is represented as follows:IR₀−IR=kΣ(V_(th) ²−(X−V_(th))²−(W−V_(th))²+(W+X−V_(th))²)=kΣ(2WX). Thus,offset components are eliminated and a term consisting of WX can beextracted.

When the current flowing through the resistor 207 is IR₀, the potentialVr is retained in the wiring 211. By subsequently changing the currentwhich flows through the resistor 207 to IR, the difference is added tothe wiring 211 owing to capacitive coupling of the capacitor 202. Inother words, the sum of Vr that is a known reference potential and thepotential having a WX component becomes a gate potential of thetransistor 204. By turning on the transistor 206, a signal from whichoffset components are eliminated can be output to the wiring 212.

FIG. 6 is a timing chart illustrating an operation of the pixel block200. For convenience, the timings of changing the signals are matched inthe chart; however, in reality, the timings are preferably shifted inconsideration of the delay inside the circuit.

First, in a period T1, the potential of the wiring 117 is brought to “H”and the potential of the wiring 116 is brought to “H”, so that the nodesN in the pixels 100 and the reference pixels 150 have reset potentials.Furthermore, the potentials of the wirings 111 are brought to “L” andwirings 112_1 to 112_4 (corresponding to the wirings 112 in the first tofourth rows) are brought to “H”, so that weight coefficients 0 arewritten.

The potential of the wiring 116 is kept at “H” in the period T2, so thatthe potential X (image data) is written to the nodes N by photoelectricconversion in the photoelectric conversion element 101.

In a period T3, a wiring 214_1 (the wiring 214 in the first row), awiring 215_1 (the wiring 215 in the first row), a wiring 214_2 (thewiring 214 in the second row), a wiring 215_2 (the wiring 215 in thesecond row), and the wiring 216 are brought to “H”, so that thepotential Vr is written to the wiring 211.

In a period T4, the potential of the wiring 111 is set at a potentialcorresponding to a weight coefficient W111, and the potential of thewiring 112_1 is set at “H”, so that the weight coefficient W111 iswritten to the node N of the pixel 100 in the first row.

In a period T5, the potential of the wiring 111 is set at a potentialcorresponding to a weight coefficient W112, and the potential of thewiring 112_2 is set at “H”, so that the weight coefficient W112 iswritten to the node N of the pixel 100 in the second row.

In a period T6, a wiring 213_1 (the wiring 213 in the first row), thewiring 214_1, and the wiring 215_1 are brought to “H”, so that a signalfrom which offset components are eliminated is output from the circuit201 of the pixel block 200 in the first row.

Then, the operation similar to the above is repeated, and a signalobtained by multiplying the pixels 100 of the pixel block 200 in thesecond row by certain weight coefficients is output in periods T7, T8,and T9. Furthermore, in periods T10, T11, and T12, a signal obtained bymultiplying the pixel 100 of the pixel block 200 in the first row byweight coefficients different from those in T4 and T5 is output.

Note that the adjacent pixel blocks 200 may share the pixel 100. Forexample, a transistor 107 capable of producing output in a mannersimilar to that of the transistor 105 is provided in the pixel 100 asillustrated in FIG. 7(A). A gate of the transistor 107 is electricallyconnected to the transistor 105, and one of a source and a drain thereofis electrically connected to a wiring 118.

The wiring 118 is utilized for electrical connection to the circuit 201in the adjacent pixel block. FIG. 7(B) illustrates a form of connectionbetween the pixels 100 (pixels 100 a, 100 b, 100 c, 100 d, 100 e, 100 f,100 g, and 100 h) and the circuits 201 (circuits 201 a and 201 b) in theadjacent pixel blocks 200 (pixel blocks 200 a and 200 b). Note that thereference pixels 150 are not illustrated in FIG. 7(B).

In the pixel block 200 a, the pixels 100 a, 100 b, 100 c, and 100 d areelectrically connected to the circuit 201 a through the wiring 113.Furthermore, the pixels 100 e and 100 g are electrically connected tothe circuit 201 a through the wiring 118.

In the pixel block 200 b, the pixels 100 e, 100 f, 100 g, and 100 h areelectrically connected to the circuit 201 b through the wiring 113.Furthermore, the pixels 100 b and 100 d are electrically connected tothe circuit 201 b through the wiring 118.

That is, the pixel block 200 a and the pixel block 200 b share thepixels 100 b, 100 d, 100 e, and 100 g. With this form, a network betweenthe pixel blocks 200 can be dense, improving the accuracy of imageanalysis and the like.

The weight coefficient can be output from the circuit 305 illustrated inFIG. 1 to the wiring 111, and it is preferable to rewrite the weightcoefficient more than once in a frame period. As the circuit 305, adecoder can be used. The circuit 305 may include a D/A converter or anSRAM. The selection of a pixel to which a weight coefficient is input isperformed by the output of a signal from the circuit 304 to the wiring112. The circuit 304 may be a decoder or a shift register.

Furthermore, the circuit 303 can output a signal to the wirings 213,215, 216, and the like connected to the transistors of the circuit 201.As the circuit 303, a decoder or a shift register can be used.

FIG. 8(A) is a diagram explaining signals output by the pixel blocks200. For simple description, FIG. 8(A) illustrates an example where thepixel array 300 consists of four pixel blocks 200 (a pixel block 200 c,a pixel block 200 d, a pixel block 200 e, and a pixel block 2000 andeach of the pixel blocks 200 includes four pixels 100.

Signal generation will be described taking the pixel block 200 c as anexample, but the pixel blocks 200 d, 200 e, and 200 f can output signalsthrough similar operations.

In the pixel block 200 c, the pixels 100 retain their respective imagedata p11, p12, p21, and p22 in the nodes N. Weight coefficients (W111,W112, W121, and W122) are input to the pixels 100, and hill which is aproduct-sum operation result is output to the wiring 212_1 (the wiring212 in the first column). Here,h111=p11×W111+p12×W112+p21×W121+p22×W122. Note that the weightcoefficients are not limited to being all different from each other, andthe same value might be input to some of the pixels 100.

Concurrently through a process similar to the above, a product-sumoperation result h121 is output from the pixel block 200 d to the wiring212_2 (the wiring 212 in the second column); thus, the output of thepixel blocks 200 in the first row is completed.

Subsequently, in the pixel blocks 200 in the second row, through aprocess similar to the above, a product-sum operation result h112 isoutput from the pixel block 200 e to the wiring 212_1. Concurrently, aproduct-sum operation result h122 is output from the pixel block 200 fto the wiring 212_2; thus, the output of the pixel blocks 200 in thesecond row is completed.

Moreover, weight coefficients are changed in the pixel blocks 200 in thefirst row and a process similar to the above is performed, so that h211and h221 can be output. Furthermore, weight coefficients are changed inthe pixel blocks 200 in the second row and a process similar to theabove is performed, so that h212 and h222 can be output. The aboveoperation is repeated as necessary.

Product-sum operation result data output to the wirings 212_1 and 212_2are sequentially input to the circuits 301 as illustrated in FIG. 8(B).The circuits 301 are circuits which perform calculation of an activationfunction and can be, for example, comparator circuits. A comparatorcircuit outputs a result of comparing input data and a set threshold asbinary data. In other words, the pixel blocks 200 and the circuits 301can operate as part of elements in a neural network.

Furthermore, from the fact that the data output by the pixel blocks 200correspond to image data of a plurality of bits and are binarized by thecircuits 301, the binarization can be rephrased as compression of imagedata.

The data binarized by the circuits 301 (h111′, h121′, h112′, h122′,h211′, h221′, h212′, and h222′) are sequentially input to the circuit302.

The circuit 302 can have a structure including a latch circuit, a shiftregister, and the like, for example. With this structure, parallelserial conversion is possible, and data input in parallel may be outputto a wiring 311 as serial data, as illustrated in FIG. 8(B). Theconnection destination of the wiring 311 is not limited. For example, itcan be connected to a neural network, a memory device, a communicationdevice, or the like.

Moreover, as illustrated in FIG. 9, the circuit 302 may include a neuralnetwork. The neural network includes memory cells arranged in a matrix,and each memory cell retains a weight coefficient. Data output by thecircuit 301 are input to the cells in the row direction, and theproduct-sum operation in the column direction can be performed. Notethat the number of memory cells illustrated in FIG. 9 is an example, andthe number is not limited.

The neural network illustrated in FIG. 9 includes memory cells 320 andreference memory cells 325 which are arranged in a matrix, a circuit340, a circuit 350, a circuit 360, the circuit 360, and a circuit 370.

FIG. 10 illustrates an example of the memory cells 320 and the referencememory cells 325. The reference memory cells 325 are provided in any onecolumn. The memory cells 320 and the reference memory cells 325 havesimilar structures and include a transistor 161, a transistor 162, and acapacitor 163.

One of a source and a drain of the transistor 161 is electricallyconnected to a gate of the transistor 162. The gate of the transistor162 is electrically connected to one electrode of the capacitor 163.Here, a point at which the one of the source and the drain of thetransistor 161, the gate of the transistor 162, and the one electrode ofthe capacitor 163 are connected is referred to as a node NM.

Agate of the transistor 161 is electrically connected to a wiring WL.The other electrode of the capacitor 163 is electrically connected to awiring RW. One of a source and a drain of the transistor 162 iselectrically connected to a reference potential wiring such as a GNDwiring.

In the memory cells 320, the other of the source and the drain of thetransistor 161 is electrically connected to a wiring WD. The other ofthe source and the drain of the transistor 162 is electrically connectedto a wiring BL.

In the reference memory cells 325, the other of the source and the drainof the transistor 161 is electrically connected to a wiring WDref. Theother of the source and the drain of the transistor 162 is electricallyconnected to a wiring BLref.

The wiring WL is electrically connected to a circuit 330. As the circuit330, a decoder, a shift register, or the like can be used.

The wiring RW is electrically connected to the circuit 301. Binary dataoutput from the circuit 301 to a wiring 311_1 or a wiring 311_2 iswritten to each memory cell.

The wiring WD and the wiring WDref are electrically connected to thecircuit 340. As the circuit 340, a decoder, a shift register, or thelike can be used. Furthermore, the circuit 340 may include a D/Aconverter or an SRAM. The circuit 340 can output a weight coefficient tobe written to the node NM.

The wiring BL and the wiring BLref are electrically connected to thecircuit 350 and the circuit 360. The circuit 350 is a power supplycircuit and can have a structure equivalent to that of the currentsource circuit 210. The circuit 360 can have a structure equivalent tothat of the circuit 201 from which the current source circuit 210 iseliminated. By the circuit 350 and the circuit 360, a signal of aproduct-sum operation result from which offset components are eliminatedcan be obtained.

The circuit 360 is electrically connected to the circuit 370. Thecircuit 370 can have a structure equivalent to that of the circuit 301and also be referred to as an activation function circuit. Theactivation function circuit has a function of performing calculation forconverting the signal input from the circuit 360 in accordance with apredefined activation function. As the activation function, a sigmoidfunction, a tanh function, a softmax function, a ReLU function, athreshold function, or the like can be used, for example. The signalconverted by the activation function circuit is output to the outside asoutput data.

As illustrated in FIG. 11(A), a neural network NN can be formed of aninput layer IL, an output layer OL, and a middle layer (hidden layer)HL. The input layer IL, the output layer OL, and the middle layer HLeach include one or more neurons (units). Note that the middle layer HLmay be composed of one layer or two or more layers. A neural networkincluding two or more middle layers HL can also be referred to as a DNN(deep neural network). Learning using a deep neural network can also bereferred to as deep learning.

Input data is input to each neuron in the input layer IL. An outputsignal of a neuron in the previous layer or the subsequent layer isinput to each neuron in the middle layer HL. To each neuron in theoutput layer OL, output signals of the neurons in the previous layer areinput. Note that each neuron may be connected to all the neurons in theprevious and subsequent layers (full connection), or may be connected tosome of the neurons.

FIG. 11(B) illustrates an example of calculation by a neuron. Here, aneuron N and two neurons in the previous layer which output signals tothe neuron N are shown. An output x₁ of the neuron in the previous layerand an output x₂ of the neuron in the previous layer are input to theneuron N. Then, in the neuron N, a total sum x₁w₁+x₂w₂ of the product ofthe output x₁ and a weight w₁ (x₁w₁) and the product of the output x₂and a weight w₂ (x₂w₂) is calculated, and then a bias b is added asnecessary, so that a value a=x₁w₁+x₂w₂+b is obtained. Then, the value ais converted with an activation function h, and an output signaly=h(a+b) is output from the neuron N.

In this manner, the calculation by the neurons includes the calculationthat sums the products of the outputs and the weights of the neurons inthe previous layer, that is, the product-sum operation (x₁w₁+x₂w₂described above). This product-sum operation may be performed using aprogram on software or using hardware.

In one embodiment of the present invention, an analog circuit is used ashardware to perform a product-sum operation. When an analog circuit isused as the product-sum operation circuit, the circuit scale of theproduct-sum operation circuit can be reduced, or higher processing speedand lower power consumption can be achieved owing to reduced frequencyof access to a memory.

The product-sum operation circuit preferably has a structure includingan OS transistor. An OS transistor is suitably used as a transistorincluded in an analog memory of the product-sum operation circuitbecause of its extremely low off-state current. Note that theproduct-sum operation circuit may include both a Si transistor and an OStransistor.

Although the processing of the captured image data in the imaging deviceof one embodiment of the present invention has been described above, theimage data can also be extracted without processing.

For example, although the sum of the data p11, p12, p21, and p22 isoutput in the pixel block 200 c of FIG. 8(A) according to the abovedescription, any one of the pixels 100 can be multiplied by the weightcoefficient 1 and the other the pixels 100 can be multiplied by theweight coefficient 0, so that image data of one pixel 100 can beextracted. Furthermore, by sequentially selecting the pixels 100 wherethe weight coefficient is 1, image data can be extracted from all thepixels 100.

As mentioned in the description of the process of extracting WX from thecircuit 201, calculating a difference between IR₀ and IR can extract theterm consisting of WX. Here, in the case where the weight coefficient is0, signals output from the pixels 100 are canceled out; thus, a signalsof only the pixels 100 where the weight coefficient is 1 can beobtained. Note that if the resolution permits, the weight coefficient inall the pixels 100 may be 1 and the image data may be extracted.

At this time, the circuits 301 preferably have a structure asillustrated in FIG. 12(A) where a comparator and a switch are connectedin parallel and the outputs thereof can be selected. In the case ofimage processing, a signal output by the pixel block 200 is input to thecomparator, and a binarized signal is output to the circuit 302. In thecase of obtaining image data, a signal output by the pixel block 200 isoutput to the circuit 302 through a path on which the switch stands. Atthis time, the circuit 302 may be provided with an A/D converter.

Alternatively, as illustrated in FIG. 12(B), the circuit 301 may consistof a comparator and a selection circuit, and the output may head for thecircuit 302 or a circuit 306. A counter circuit can be used as thecircuit 306. The comparator and the counter circuit can form an A/Dconverter. Note that the circuit 306 may be provided in the circuit 302.

Alternatively, as illustrated in FIG. 12(C), the pixel 100 may have astructure provided with a transistor 108 and a transistor 109. Thetransistor 108 can have a function of outputting a signal (image data)corresponding to the potential of the node N. The transistor 109 canhave a function of selecting the pixel 100.

A gate of the transistor 108 is electrically connected to one electrodeof the capacitor 104. One of a source and a drain of the transistor 108is electrically connected to one of a source and a drain of thetransistor 109. The other of the source and the drain of the transistor108 is electrically connected to a wiring 121. A gate of the transistor109 is electrically connected to a wiring 119. The other of the sourceand the drain of the transistor 109 is electrically connected to awiring 120.

The wiring 119 can have a function of a signal line which controls theelectrical conduction of the transistor 109. The wiring 120 can have afunction of an output line. The wiring 121 can have a function of apower supply line and can be, for example, a high potential power supplyline.

The wiring 120 can be electrically connected to a correlated doublesampling circuit (CDS circuit) and an A/D converter. Alternatively, thewiring 120 may have a structure of being electrically connected to thewiring 113 through a switch. In this case, the output of the transistor105 and the output of the transistor 108 can be selectively input to thecircuit 201. In the case where the output of the transistor 108 isselected, formation of the circuit 301 with the structures illustratedin FIGS. 12(A) and 12(B) enables obtainment of image data.

This embodiment can be combined with the description of the otherembodiments as appropriate.

Embodiment 2

In this embodiment, structure examples and the like of the imagingdevice of one embodiment of the present invention are described.

FIG. 13(A) illustrates a structure example of a pixel included in theimaging device. The pixel illustrated in FIG. 13(A) is an example havinga stacked-layer structure of a layer 561 and a layer 62.

The layer 561 includes the photoelectric conversion element 101. Asillustrated in FIG. 13(C), the photoelectric conversion element 101 canbe a stacked layer of a layer 565 a, a layer 565 b, and a layer 565 c.

The photoelectric conversion element 101 illustrated in FIG. 13(C) is apn-junction photodiode; for example, a p⁺-type semiconductor, an n-typesemiconductor, and an n⁺-type semiconductor can be used for the layer565 a, the layer 565 b, and the layer 565 c, respectively.Alternatively, an n⁺-type semiconductor, a p-type semiconductor, and ap⁺-type semiconductor may be used for the layer 565 a, the layer 565 b,and the layer 565 c, respectively. Alternatively, a pin-junctionphotodiode in which the layer 565 b is an i-type semiconductor may beused.

The above-described pn-junction photodiode or pin-junction photodiodecan be formed using single crystal silicon. Furthermore, thepin-junction photodiode can also be formed using a thin film ofamorphous silicon, microcrystalline silicon, polycrystalline silicon, orthe like.

The photoelectric conversion element 101 included in the layer 561 maybe a stacked layer of a layer 566 a, a layer 566 b, a layer 566 c, and alayer 566 d as illustrated in FIG. 13(D). The photoelectric conversionelement 101 illustrated in FIG. 13(D) is an example of an avalanchephotodiode, and the layer 566 a and the layer 566 d correspond toelectrodes and the layers 566 b and 566 c correspond to a photoelectricconversion portion.

The layer 566 a is preferably a low-resistance metal layer or the like.For example, aluminum, titanium, tungsten, tantalum, silver, or astacked layer thereof can be used.

As the layer 566 d, a conductive layer having a high visiblelight-transmitting property is preferably used. For example, indiumoxide, tin oxide, zinc oxide, indium tin oxide, gallium zinc oxide,indium gallium zinc oxide, graphene, or the like can be used. Note thatthe layer 566 d can be omitted.

The layers 566 b and 566 c of the photoelectric conversion portion canhave, for example, a structure of a pn-junction photodiode with aselenium-based material for a photoelectric conversion layer. Aselenium-based material, which is a p-type semiconductor, is preferablyused for the layer 566 b, and gallium oxide or the like, which is ann-type semiconductor, is preferably used for the layer 566 c.

The photoelectric conversion element with a selenium-based material hasa property of high external quantum efficiency with respect to visiblelight. In the photoelectric conversion element, the amount ofamplification of electrons with respect to the amount of incident lightcan be increased by utilizing the avalanche multiplication. Aselenium-based material has a high light-absorption coefficient, andthus has advantages in production; for example, a photoelectricconversion layer can be fabricated as a thin film. A thin film of aselenium-based material can be formed by a vacuum evaporation method, asputtering method, or the like.

As the selenium-based material, crystalline selenium such as singlecrystal selenium or polycrystalline selenium, amorphous selenium, acompound of copper, indium, and selenium (CIS), a compound of copper,indium, gallium, and selenium (CIGS), or the like can be used.

An n-type semiconductor is preferably formed with a material having awide band gap and a visible light-transmitting property. For example,zinc oxide, gallium oxide, indium oxide, tin oxide, or a mixed oxidethereof can be used. In addition, these materials also have a functionof a hole injection blocking layer, and a dark current can be decreased.

As the layer 562 illustrated in FIG. 13(A), a silicon substrate can beused, for example. The silicon substrate includes a Si transistor or thelike. Using the Si transistor, not only a pixel circuit but also acircuit for driving the pixel circuit, a circuit for reading an imagesignal, an image processing circuit, and the like can be provided.Specifically, part or all of the transistors included in the peripheralcircuits (such as the pixels 100 and the reference pixels 150, thecircuit 201, and the circuits 301 to 305) described in Embodiment 1 canbe provided in the layer 562.

Furthermore, the pixel may have a stacked-layer structure of the layer561, a layer 563, and the layer 562 as illustrated in FIG. 13(B).

The layer 563 can include OS transistors (for example, the transistors102 and 103 of the pixel 100). In that case, the layer 562 preferablyincludes Si transistors (for example, the transistors 105 and 106 of thepixel 100). Furthermore, part of the transistors included in theperipheral circuits described in Embodiment 1 may be provided in thelayer 563.

With such a structure, components of the pixel circuit and theperipheral circuits can be dispersed in a plurality of layers and thecomponents can be provided to overlap with each other or any of thecomponent and any of the peripheral circuits can be provided to overlapwith each other, whereby the area of the imaging device can be reduced.Note that in the structure of FIG. 13(B), the layer 562 may be a supportsubstrate, and the pixels 100 and the peripheral circuits may beprovided in the layer 561 and the layer 563.

As a semiconductor material used for the OS transistors, a metal oxidewhose energy gap is greater than or equal to 2 eV, preferably greaterthan or equal to 2.5 eV, further preferably greater than or equal to 3eV can be used. A typical example thereof is an oxide semiconductorcontaining indium, and for example, a CAC-OS described later or the likecan be used.

The semiconductor layer can be, for example, a film represented by anIn-M-Zn-based oxide that contains indium, zinc, and M (a metal such asaluminum, titanium, gallium, germanium, yttrium, zirconium, lanthanum,cerium, tin, neodymium, or hafnium).

In the case where an oxide semiconductor that forms the semiconductorlayer is an In-M-Zn-based oxide, it is preferable that the atomic ratioof the metal elements of a sputtering target used to deposit the In-M-Znoxide satisfy In M and Zn M. The atomic ratio of metal elements of sucha sputtering target is preferably, for example, In:M:Zn=1:1:1,In:M:Zn=1:1:1.2, In:M:Zn=3:1:2, In:M:Zn=4:2:3, In:M:Zn=4:2:4.1,In:M:Zn=5:1:6, In:M:Zn=5:1:7, or In:M:Zn=5:1:8. Note that the atomicratio in the deposited semiconductor layer varies from the above atomicratios of metal elements of the sputtering targets in a range of ±40%.

An oxide semiconductor with low carrier density is used as thesemiconductor layer. For example, for the semiconductor layer, an oxidesemiconductor whose carrier density is lower than or equal to1×10¹⁷/cm³, preferably lower than or equal to 1×10¹⁵/cm³, furtherpreferably lower than or equal to 1×10¹³/cm³, still further preferablylower than or equal to 1×10¹¹/cm³, even further preferably lower than1×10¹⁰/cm³, and higher than or equal to 1×10⁻⁹/cm³ can be used. Such anoxide semiconductor is referred to as a highly purified intrinsic orsubstantially highly purified intrinsic oxide semiconductor. The oxidesemiconductor has a low impurity concentration and a low density ofdefect states and can thus be referred to as an oxide semiconductorhaving stable characteristics.

However, the composition is not limited to those, and a material havingthe appropriate composition may be used depending on requiredsemiconductor characteristics and electrical characteristics of thetransistor (field-effect mobility, threshold voltage, or the like). Toobtain the required semiconductor characteristics of the transistor, itis preferable that the carrier density, the impurity concentration, thedefect density, the atomic ratio between a metal element and oxygen, theinteratomic distance, the density, and the like of the semiconductorlayer be set to be appropriate.

When silicon or carbon, which is one of elements belonging to Group 14,is contained in the oxide semiconductor contained in the semiconductorlayer, oxygen vacancies are increased, and the semiconductor layerbecomes n-type. Thus, the concentration of silicon or carbon(concentration measured by secondary ion mass spectrometry) in thesemiconductor layer is set to lower than or equal to 2×10¹⁸ atoms/cm³,preferably lower than or equal to 2×10¹⁷ atoms/cm³.

Alkali metal and alkaline earth metal might generate carriers whenbonded to an oxide semiconductor, in which case the off-state current ofthe transistor might be increased. Thus, the concentration of alkalimetal or alkaline earth metal (concentration measured by secondary ionmass spectrometry) in the semiconductor layer is set to lower than orequal to 1×10¹⁸ atoms/cm³, preferably lower than or equal to 2×10¹⁶atoms/cm³.

When nitrogen is contained in the oxide semiconductor contained in thesemiconductor layer, electrons serving as carriers are generated and thecarrier density increases, so that the semiconductor layer easilybecomes n-type. As a result, a transistor including an oxidesemiconductor which contains nitrogen is likely to have normally-oncharacteristics. Hence, the concentration of nitrogen (concentrationmeasured by secondary ion mass spectrometry) is preferably set to lowerthan or equal to 5×10¹⁸ atoms/cm³.

The semiconductor layer may have a non-single-crystal structure, forexample. Examples of the non-single-crystal structure include a CAAC-OSincluding a c-axis aligned crystal (C-Axis Aligned Crystalline OxideSemiconductor or C-Axis Aligned and A-B-plane Anchored Crystalline OxideSemiconductor), a polycrystalline structure, a microcrystallinestructure, and an amorphous structure. Among the non-single-crystalstructures, the amorphous structure has the highest density of defectstates, whereas the CAAC-OS has the lowest density of defect states.

An oxide semiconductor film having an amorphous structure has disorderedatomic arrangement and no crystalline component, for example. Moreover,an oxide film having an amorphous structure has a completely amorphousstructure and no crystal part, for example.

Note that the semiconductor layer may be a mixed film including two ormore of a region having an amorphous structure, a region having amicrocrystalline structure, a region having a polycrystalline structure,a region of the CAAC-OS, and a region having a single crystal structure.The mixed film has, for example, a single-layer structure or astacked-layer structure including two or more of the above regions insome cases.

The composition of a CAC (Cloud-Aligned Composite)-OS, which is oneembodiment of a non-single-crystal semiconductor layer, will bedescribed below.

The CAC-OS is, for example, a composition of a material in whichelements included in an oxide semiconductor are unevenly distributed tohave a size of greater than or equal to 0.5 nm and less than or equal to10 nm, preferably greater than or equal to 1 nm and less than or equalto 2 nm, or a similar size. Note that in the following description, astate in which one or more metal elements are unevenly distributed andregions including the metal element(s) are mixed to have a size ofgreater than or equal to 0.5 nm and less than or equal to 10 nm,preferably greater than or equal to 1 nm and less than or equal to 2 nm,or a similar size in an oxide semiconductor is referred to as a mosaicpattern or a patch-like pattern.

Note that an oxide semiconductor preferably contains at least indium. Inparticular, indium and zinc are preferably contained. Moreover, inaddition to these, one kind or a plurality of kinds selected fromaluminum, gallium, yttrium, copper, vanadium, beryllium, boron, silicon,titanium, iron, nickel, germanium, zirconium, molybdenum, lanthanum,cerium, neodymium, hafnium, tantalum, tungsten, magnesium, and the likemay be contained.

For instance, a CAC-OS in an In-Ga—Zn oxide (an In-Ga—Zn oxide in theCAC-OS may be particularly referred to as CAC-IGZO) has a composition inwhich materials are separated into indium oxide (hereinafter InO_(X1)(X1 is a real number greater than 0)) or indium zinc oxide (hereinafterIn_(X2)Zn_(Y2)O_(Z2) (X2, Y2, and Z2 are real numbers greater than 0))and gallium oxide (hereinafter GaO_(X3) (X3 is a real number greaterthan 0)) or gallium zinc oxide (hereinafter Ga_(X4)Zn_(Y4)O_(Z4) (X4,Y4, and Z4 are real numbers greater than 0)), for example, so that amosaic pattern is formed, and mosaic-like InO_(X1) orIn_(X2)Zn_(Y2)O_(Z2) is evenly distributed in the film (which ishereinafter also referred to as cloud-like).

That is, the CAC-OS is a composite oxide semiconductor having acomposition in which a region where GaO_(X3) is a main component and aregion where In_(X2)Zn_(Y2)O_(Z2) or InO_(X1) is a main component aremixed. Note that in this specification, for example, when the atomicratio of In to an element M in a first region is larger than the atomicratio of In to the element M in a second region, the first region isregarded as having a higher In concentration than the second region.

Note that IGZO is a commonly known name and sometimes refers to onecompound formed of In, Ga, Zn, and O. A typical example is a crystallinecompound represented by InGaO₃(ZnO)_(m1) (m1 is a natural number) orIn_((1+x0))Ga_((1−x0))O₃(ZnO)_(m0) (−1≤x0≤1; m0 is a given number).

The above crystalline compound has a single crystal structure, apolycrystalline structure, or a CAAC structure. Note that the CAACstructure is a crystal structure in which a plurality of IGZOnanocrystals have c-axis alignment and are connected in the a-b planewithout alignment.

Meanwhile, the CAC-OS relates to the material composition of an oxidesemiconductor. The CAC-OS refers to a composition in which, in thematerial composition containing In, Ga, Zn, and O, some regions thatcontain Ga as a main component and are observed as nanoparticles andsome regions that contain In as a main component and are observed asnanoparticles are randomly dispersed in a mosaic pattern. Therefore, thecrystal structure is a secondary element for the CAC-OS.

Note that the CAC-OS is regarded as not including a stacked-layerstructure of two or more kinds of films with different compositions. Forexample, a two-layer structure of a film containing In as a maincomponent and a film containing Ga as a main component is not included.

Note that a clear boundary cannot sometimes be observed between theregion where GaO_(X3) is a main component and the region whereIn_(X2)Zn_(Y2)O_(Z2) or InO_(X1) is a main component.

Note that in the case where one kind or a plurality of kinds selectedfrom aluminum, yttrium, copper, vanadium, beryllium, boron, silicon,titanium, iron, nickel, germanium, zirconium, molybdenum, lanthanum,cerium, neodymium, hafnium, tantalum, tungsten, magnesium, and the likeare contained instead of gallium, the CAC-OS refers to a composition inwhich some regions that contain the metal element(s) as a main componentand are observed as nanoparticles and some regions that contain In as amain component and are observed as nanoparticles are randomly dispersedin a mosaic pattern.

The CAC-OS can be formed by a sputtering method under a condition wherea substrate is not heated intentionally, for example. In the case offorming the CAC-OS by a sputtering method, one or more selected from aninert gas (typically, argon), an oxygen gas, and a nitrogen gas may beused as a deposition gas. Furthermore, the ratio of the flow rate of anoxygen gas to the total flow rate of the deposition gas at the time ofdeposition is preferably as low as possible, and for example, the ratioof the flow rate of the oxygen gas is preferably higher than or equal to0% and lower than 30%, further preferably higher than or equal to 0% andlower than or equal to 10%.

The CAC-OS is characterized in that no clear peak is observed inmeasurement using θ/2θ scan by an Out-of-plane method, which is one ofX-ray diffraction (XRD) measurement methods. That is, it is found fromthe X-ray diffraction that no alignment in the a-b plane direction andthe c-axis direction is observed in a measured region.

In addition, in an electron diffraction pattern of the CAC-OS which isobtained by irradiation with an electron beam with a probe diameter of 1nm (also referred to as a nanobeam electron beam), a ring-likehigh-luminance region and a plurality of bright spots in the ring regionare observed. It is therefore found from the electron diffractionpattern that the crystal structure of the CAC-OS includes an nc(nano-crystal) structure with no alignment in the plan-view directionand the cross-sectional direction.

Moreover, for example, it can be confirmed by EDX mapping obtained usingenergy dispersive X-ray spectroscopy (EDX) that the CAC-OS in theIn-Ga—Zn oxide has a composition in which regions where GaO_(X3) is amain component and regions where In_(X2)Zn_(Y2)O_(Z2) or InO_(X1) is amain component are unevenly distributed and mixed.

The CAC-OS has a composition different from that of an IGZO compound inwhich the metal elements are evenly distributed, and has characteristicsdifferent from those of the IGZO compound. That is, the CAC-OS has acomposition in which regions where GaO_(X3) or the like is a maincomponent and regions where In_(X2)Zn_(Y2)O_(Z2) or InO_(X1) is a maincomponent are phase-separated from each other and form a mosaic pattern.

Here, a region where In_(X2)Zn_(Y2)O_(Z2) or InO_(X1) is a maincomponent is a region whose conductivity is higher than that of a regionwhere GaO_(X3) or the like is a main component. In other words, whencarriers flow through the regions where In_(X2)Zn_(Y2)O_(Z2) or InO_(X1)is a main component, the conductivity of an oxide semiconductor isexhibited. Accordingly, when the regions where In_(X2)Zn_(Y2)O_(Z2) orInO_(X1) is a main component are distributed like a cloud in an oxidesemiconductor, high field-effect mobility (μ) can be achieved.

In contrast, a region where GaO_(X3) or the like is a main component isa region whose insulating property is higher than that of a region whereIn_(X2)Zn_(Y2)O_(Z2) or InO_(X1) is a main component. In other words,when regions where GaO_(X3) or the like is a main component aredistributed in an oxide semiconductor, leakage current can be suppressedand favorable switching operation can be achieved.

Accordingly, when the CAC-OS is used for a semiconductor element, theinsulating property derived from GaO_(X3) or the like and theconductivity derived from In_(X2)Zn_(Y2)O_(Z2) or InO_(X1) complementeach other, whereby a high on-state current (Ion) and high field-effectmobility (μ) can be achieved.

Moreover, a semiconductor element using the CAC-OS has high reliability.Thus, the CAC-OS is suitable as a constituent material in a variety ofsemiconductor devices.

FIG. 14(A) is a diagram illustrating an example of a cross section ofthe pixel illustrated in FIG. 13(A). The layer 561 includes apn-junction photodiode with silicon for a photoelectric conversionlayer, as the photoelectric conversion element 101. The layer 562includes a Si transistor, and FIG. 14(A) illustrates the transistors 102and 105 included in the pixel circuit as an example.

In the photoelectric conversion element 101, the layer 565 a can be ap⁺-type region, the layer 565 b can be an n-type region, and the layer565 c can be an n⁺-type region. In the layer 565 b, a region 536 forconnection between a power supply line and the layer 565 c is provided.For example, the region 536 can be a p⁺-type region.

Although the Si transistor illustrated in FIG. 14(A) is of a planar typeincluding a channel formation region in the silicon substrate 540, astructure including a fin semiconductor layer in the silicon substrate540 as illustrated in FIGS. 16(A) and 16(B) may be employed. FIG. 16(A)corresponds to a cross section in the channel length direction and FIG.16(B) corresponds to a cross section in the channel width direction.

Alternatively, as illustrated in FIG. 16(C), transistors each includinga semiconductor layer 545 of a silicon thin film may be used. Thesemiconductor layer 545 can be single crystal silicon (SOI (Silicon onInsulator)) formed on an insulating layer 546 on the silicon substrate540, for example.

Here, FIG. 14(A) illustrates a structure example in which electricalconnection between elements of the layer 561 and elements of the layer562 is obtained by bonding technique.

An insulating layer 542, a conductive layer 533, and a conductive layer534 are provided in the layer 561. The conductive layer 533 and theconductive layer 534 each include a region embedded in the insulatinglayer 542. The conductive layer 533 is electrically connected to thelayer 565 a. The conductive layer 534 is electrically connected to theregion 536. Furthermore, surfaces of the insulating layer 542, theconductive layer 533, and the conductive layer 534 are planarized to belevel with each other.

An insulating layer 541, a conductive layer 531, and a conductive layer532 are provided in the layer 562. The conductive layer 531 and theconductive layer 532 each include a region embedded in the insulatinglayer 541. The conductive layer 531 is electrically connected to a powersupply line. The conductive layer 532 is electrically connected to thesource or the drain of the transistor 102. Furthermore, surfaces of theinsulating layer 541, the conductive layer 531, and the conductive layer532 are planarized to be level with each other.

Here, main components of the conductive layer 531 and the conductivelayer 533 are preferably the same metal element. Main components of theconductive layer 532 and the conductive layer 534 are preferably thesame metal element. Furthermore, the insulating layer 541 and theinsulating layer 542 are preferably formed of the same component.

For example, for the conductive layers 531, 532, 533, and 534, Cu, Al,Sn, Zn, W, Ag, Pt, Au, or the like can be used. Preferably, Cu, Al, W,or Au is used for easy bonding. In addition, for the insulating layers541 and 542, silicon oxide, silicon oxynitride, silicon nitride oxide,silicon nitride, titanium nitride, or the like can be used.

That is, the same metal element described above is preferably used for acombination of the conductive layer 531 and the conductive layer 533 andthe same metal element described above is preferably used for acombination of the conductive layer 532 and the conductive layer 534.Furthermore, the same insulating material described above is preferablyused for the insulating layer 541 and the insulating layer 542. Withthis structure, bonding in which a boundary between the layer 561 andthe layer 562 is a bonding position can be performed.

By the bonding, the electrical connection of each of the combination ofthe conductive layer 531 and the conductive layer 533 and thecombination of the conductive layer 532 and the conductive layer 534 canbe obtained. In addition, connection between the insulating layer 541and the insulating layer 542 with mechanical strength can be obtained.

For bonding the metal layers to each other, a surface activated bondingmethod in which an oxide film, a layer adsorbing impurities, and thelike on the surface are removed by sputtering treatment or the like andthe cleaned and activated surfaces are brought into contact to be bondedto each other can be used. Alternatively, a diffusion bonding method inwhich the surfaces are bonded to each other by using temperature andpressure together or the like can be used. Both methods cause bonding atan atomic level, and therefore not only electrically but alsomechanically excellent bonding can be achieved.

Furthermore, for bonding the insulating layers to each other, ahydrophilic bonding method or the like can be used; in the method, afterhigh planarity is obtained by polishing or the like, the surfaces of theinsulating layers subjected to hydrophilicity treatment with oxygenplasma or the like are brought into contact to be bonded to each othertemporarily, and then dehydrated by heat treatment to perform finalbonding. The hydrophilic bonding method can also cause bonding at anatomic level; thus, mechanically excellent bonding can be achieved.

When the layer 561 and the layer 562 are bonded together, the insulatinglayers and the metal layers coexist on their bonding surfaces;therefore, the surface activated bonding method and the hydrophilicbonding method are performed in combination, for example.

For example, a method in which the surfaces are cleaned after polishing,the surfaces of the metal layers are subjected to antioxidant treatmentand then hydrophilicity treatment, and then bonding is performed.Furthermore, hydrophilicity treatment may be performed on the surfacesof the metal layers being hardly oxidizable metal such as Au. Note thata bonding method other than the above-mentioned methods may be used.

FIG. 14(B) is a cross-sectional view of the case where a pn-junctionphotodiode with a selenium-based material for a photoelectric conversionlayer is used for the layer 561 of the pixel illustrated in FIG. 13(A).The layer 566 a is included as one electrode, the layers 566 b and 566 care included as the photoelectric conversion layer, and the layer 566 dis included as the other electrode.

In this case, the layer 561 can be directly formed on the layer 562. Thelayer 566 a is electrically connected to the source or the drain of thetransistor 102. The layer 566 d is electrically connected to a powersupply line through the region 536.

FIG. 15(A) is a diagram illustrating an example of a cross section ofthe pixel illustrated in FIG. 16(B). The layer 561 includes a pn-junction photodiode using silicon for a photoelectric conversion layer,as the photoelectric conversion element 101. The layer 562 includes a Sitransistor, and FIG. 15(A) illustrates the transistor 105 included inthe pixel circuit as an example. The layer 562 includes an OStransistor, and FIG. 15(A) illustrates the transistors 102 and 103included in the pixel circuit as an example. A structure example isillustrated in which electrical connection between the layer 561 and thelayer 563 is obtained by bonding.

Although the OS transistor having a self-aligned structure isillustrated in FIG. 15(A), a non-self-aligned top-gate transistor mayalso be used as illustrated in FIG. 16(D).

Although the transistors 102 and 103 include a back gate 535, a mode inwhich the back gate is not included may be employed. As illustrated inFIG. 16(E), the back gate 535 may be electrically connected to a frontgate of the transistor, which is provided to face the back gate 535.Alternatively, a structure in which a fixed potential different fromthat for the front gate can be supplied to the back gate 535 may beemployed.

An insulating layer 543 that has a function of inhibiting diffusion ofhydrogen is provided between a region where an OS transistor is formedand a region where Si transistors are formed. Dangling bonds of siliconare terminated with hydrogen in insulating layers provided in thevicinity of a channel formation region of the transistor 105. Meanwhile,hydrogen in an insulating layer provided in the vicinity of channelformation regions of the transistors 102 and 103 is one of the factorsgenerating carriers in the oxide semiconductor layer.

Hydrogen is confined in one layer by the insulating layer 543, so thatthe reliability of the transistor 105 can be improved. Furthermore,diffusion of hydrogen from the one layer to the other layer isinhibited, so that the reliability of the transistors 102 and 103 canalso be improved.

For the insulating layer 543, aluminum oxide, aluminum oxynitride,gallium oxide, gallium oxynitride, yttrium oxide, yttrium oxynitride,hafnium oxide, hafnium oxynitride, yttria-stabilized zirconia (YSZ), orthe like can be used.

FIG. 15(B) is a cross-sectional view of the case where a pn-junctionphotodiode that uses a selenium-based material as a photoelectricconversion layer is used for the layer 561 of the pixel illustrated inFIG. 13(B). The layer 561 can be directly formed on the layer 563. Theabove description can be referred to for the details of the layers 561,562, and 563.

FIG. 17(A) is a perspective view illustrating an example in which acolor filter and the like are added to the pixel of the imaging deviceof one embodiment of the present invention. In the perspective view,cross sections of the plurality of pixels are also illustrated. Aninsulating layer 580 is formed over the layer 561 where thephotoelectric conversion element 101 is formed. As the insulating layer580, a silicon oxide film with a high visible light-transmittingproperty can be used, for example. A silicon nitride film may be stackedas a passivation film. A dielectric film of hafnium oxide or the likemay be stacked as an anti-reflection film.

A light-blocking layer 581 may be formed over the insulating layer 580.The light-blocking layer 581 has a function of preventing color mixingof light passing through the upper color filter. As the light-blockinglayer 581, a metal layer of aluminum, tungsten, or the like can be used.The metal layer and a dielectric film having a function of ananti-reflection film may be stacked.

An organic resin layer 582 can be provided as a planarization film overthe insulating layer 580 and the light-blocking layer 581. A colorfilter 583 (color filters 583 a, 583 b, and 583 c) is formed in eachpixel. When colors of R (red), G (green), B (blue), Y (yellow), C(cyan), and M (magenta) are assigned to the color filters 583 a, 583 b,and 583 c, for example, a color image can be obtained.

An insulating layer 586 or the like having a visible light-transmittingproperty can be provided over the color filter 583.

As illustrated in FIG. 17(B), an optical conversion layer 585 may beused instead of the color filter 583. Such a structure enables theimaging device capable of obtaining images in various wavelengthregions.

When a filter that blocks light with a wavelength shorter than or equalto that of visible light is used as the optical conversion layer 585,for example, it is possible to obtain an infrared imaging device. When afilter that blocks light with a wavelength shorter than or equal to thatof near infrared light is used as the photoelectric conversion layer585, it is possible to obtain a far-infrared imaging device. When afilter that blocks light with a wavelength longer than or equal to thatof visible light is used as the photoelectric conversion layer 585, itis possible to obtain an ultraviolet imaging device.

Furthermore, when a scintillator is used as the optical conversion layer585, it is possible to obtain an imaging device that obtains an imagevisualizing the intensity of radiation and is used for an X-ray imagingdevice or the like. Radiations such as X-rays that pass through anobject to enter a scintillator are converted into light (fluorescence)such as visible light or ultraviolet light owing to a photoluminescencephenomenon. Then, the light is detected by the photoelectric conversionelement 101, whereby image data is obtained. Moreover, the imagingdevice having the above structure may be used in a radiation detector orthe like.

A scintillator contains a substance that, when irradiated with radiationsuch as X-rays or gamma rays, absorbs energy thereof to emit visiblelight or ultraviolet light. For example, it is possible to use a resinor ceramics in which Gd₂O₂S:Tb, Gd₂O₂S:Pr, Gd₂O₂S:Eu, BaFCl:Eu, NaI,CsI, CaF₂, BaF₂, CeF₃, LiF, LiI, ZnO, or the like is dispersed.

In the photoelectric conversion element 101 using a selenium-basedmaterial, radiation such as X-rays can be directly converted intocharge; thus, a structure in which the scintillator is unnecessarily canalso be employed.

As illustrated in FIG. 17(C), a microlens array 584 may be provided overthe color filter 583. Light passing through lenses of the microlensarray 584 goes through the color filter 583 positioned thereunder andthe photoelectric conversion element 101 is irradiated with the light.The microlens array 584 may be provided over the optical conversionlayer 585 illustrated in FIG. 17(B).

Hereinafter, examples of a package and a camera module in each of whichan image sensor chip is placed will be described. For the image sensorchip, the structure of the above-described imaging device can be used.

FIG. 18(A1) is an external perspective view of the top surface side of apackage in which an image sensor chip is placed. The package includes apackage substrate 410 to which an image sensor chip 450 is fixed, acover glass 420, an adhesive 430 for bonding the package substrate 410and the cover glass 420, and the like.

FIG. 18(A2) is an external perspective view of the bottom surface sideof the package. A BGA (Ball grid array) in which solder balls serve asbumps 440 is provided on the bottom surface of the package. Note that,not limited to the BGA, an LGA (Land grid array), a PGA (Pin GridArray), or the like may be provided.

FIG. 18(A3) is a perspective view of the package, in which some parts ofthe cover glass 420 and the adhesive 430 are not illustrated. Electrodepads 460 are formed over the package substrate 410, and the electrodepads 460 and the bumps 440 are electrically connected via through-holes.The electrode pads 460 are electrically connected to the image sensorchip 450 through wires 470.

Furthermore, FIG. 18(B1) is an external perspective view of the topsurface side of a camera module in which an image sensor chip is placedin a package with a built-in lens. The camera module includes a packagesubstrate 411 to which an image sensor chip 451 is fixed, a lens cover421, a lens 435, and the like. Furthermore, an IC chip 490 havingfunctions of a driver circuit, a signal conversion circuit, and the likeof an imaging device is provided between the package substrate 411 andthe image sensor chip 451; thus, the structure as an SiP (System inpackage) is included.

FIG. 18(B2) is an external perspective view of the bottom surface sideof the camera module. On the bottom surface and side surfaces of thepackage substrate 411, a QFN (Quad flat no-lead package) structure inwhich lands 441 for mounting are provided is used. Note that thisstructure is an example, and a QFP (Quad flat package) or theabove-mentioned BGA may be employed.

FIG. 18(B3) is a perspective view of the module, in which some parts ofthe lens cover 421 and the lens 435 are not illustrated. The lands 441are electrically connected to electrode pads 461, and the electrode pads461 are electrically connected to the image sensor chip 451 or the ICchip 490 through wires 471.

The image sensor chip placed in a package having the above form can beeasily mounted on a printed substrate or the like, and the image sensorchip can be incorporated into a variety of semiconductor devices andelectronic devices.

This embodiment can be combined with any of the other embodiments asappropriate.

Embodiment 3

As electronic devices that can use an imaging device of one embodimentof the present invention, display devices, personal computers, imagememory devices or image reproducing devices provided with a recordingmedium, mobile phones, game machines including portable game machines,portable data terminals, e-book readers, cameras such as video camerasand digital still cameras, goggle-type displays (head mounted displays),navigation systems, audio reproducing devices (car audio players,digital audio players, and the like), copiers, facsimiles, printers,multifunction printers, automated teller machines (ATM), vendingmachines, and the like are given. FIG. 19 illustrates specific examplesof these electronic devices.

FIG. 19(A) is a surveillance camera which includes a support base 951, acamera unit 952, a protective cover 953, and the like. The camera unit952 is provided with a rotation mechanism and the like and can capturean image of all of the surroundings when provided on a ceiling. Theimaging device of one embodiment of the present invention can beincluded as a component for obtaining an image in the camera unit. Notethat a surveillance camera is a common name and does not limit the usethereof. A device that has a function of a surveillance camera is alsoreferred to as a camera or a video camera, for example.

FIG. 19(B) is a video camera which includes a first housing 971, asecond housing 972, a display portion 973, an operation key 974, a lens975, a connection portion 976, and the like. The operation key 974 andthe lens 975 are provided on the first housing 971, and the displayportion 973 is provided on the second housing 972. The imaging device ofone embodiment of the present invention can be included as a componentfor obtaining an image in the video camera.

FIG. 19(C) is a digital camera which includes a housing 961, a shutterbutton 962, a microphone 963, a light-emitting portion 967, a lens 965,and the like. The imaging device of one embodiment of the presentinvention can be included as a component for obtaining an image in thedigital camera.

FIG. 19(D) is a wrist-watch-type information terminal which includes adisplay portion 932, a housing 933 also serving as a wristband, a camera939, and the like. The display portion 932 is provided with a touchpanel for operating the information terminal. The display portion 932and the housing 933 also serving as a wristband have flexibility and fita body well. The imaging device of one embodiment of the presentinvention can be included as a component for obtaining an image in theinformation terminal.

FIG. 19(E) is an example of a cellular phone which includes a housing981, a display portion 982, an operation button 983, an externalconnection port 984, a speaker 985, a microphone 986, a camera 987, andthe like. The display portion 982 of the cellular phone includes a touchsensor. All operations including making a call and inputting text can beperformed by touch on the display portion 982 with a finger, a stylus,or the like. The imaging device of one embodiment of the presentinvention can be included as a component for obtaining an image in thecellular phone.

FIG. 19(F) is a portable data terminal which includes a housing 911, adisplay portion 912, a camera 919, and the like. Input and output ofinformation can be performed by a touch panel function of the displayportion 912. The imaging device of one embodiment of the presentinvention can be included as a component for obtaining an image in theportable data terminal.

This embodiment can be combined with any of the other embodiments asappropriate.

Example

In this example, an imaging device having the structure of oneembodiment of the present invention described in Embodiment 1 wasprototyped. Results of image processing in the imaging device will bedescribed.

FIG. 20 illustrates a pixel circuit (corresponding to the pixel 100) ofthe prototyped imaging device. The imaging device described inEmbodiment 1 has a structure of extracting the product (WX) of imagedata (potential X) and a weight coefficient (potential W) from adifference between the output of the pixels 100 and the output of thereference pixels 150, while the prototyped imaging device has astructure which is not provided with the reference pixels 150 andextracts WX by performing double sampling with and without the input ofthe weight coefficient (potential W) and calculating the differencetherebetween at the outside.

The prototyped imaging device has a pixel circuit including a photodiodePD and transistors Tr1, Tr2, Tr3, Tr4, and Tr5. The connection structurethereof is as illustrated in FIG. 20. Here, the transistor Tr3 has astructure in which a source and a drain are short-circuited and operatesas a capacitor (MOS Capasitor). Selenium was used for a photoelectricconversion layer of the photodiode PD. As the transistors Tr1, Tr2, Tr3,Tr4, and Tr5, OS transistors were formed. The other specifications areshown in Table 1.

TABLE 1 Image sensor's external 30 mm (H) × 40 mm (V) dimensionsCaptured area size 23.04 mm (H) × 23.04 mm (V) Number of pixels 256 (H)× 256 (V) Pixel size 90 mm (H) × 90 mm (V) Pixel configuration PD (Se) +4 OS-FET + 1 MOS Capasitor Peripheral circuit Row and column drivers:shift register method, Read circuit CDS source follower Output mode 8chanalog voltage, sequential output

TX, RS, and SE are signal potentials for driving the transistors. VPD,VRS, and VPI are power supply potentials; VPD and VPI are highpotentials; and VRS is a low potential. VBG is a back gate potential foradjusting the threshold voltages of the transistors Tr1 and Tr2. BWcorresponds to a weight coefficient (potential W) and is added to thenode N by capacitive coupling.

Double sampling operation is as follows. First, the transistors Tr1 andTr2 are turned on to reset the node N. After the transistor Tr2 isturned off, the potential of the node N is changed by the operation ofthe photodiode PD. Next, the transistor Tr1 is turned off and BW issupplied as a desired weight coefficient, so that the potential of thenode N is determined. Then, the transistor Tr5 is turned on, and a firstimage signal is taken to the outside.

Next, BW is returned to an initial value, and a second image signal istaken to the outside. Then, a difference between the first image signaland the second image signal is calculated and WX is extracted. Note thatthe order of obtaining the first image signal and the second imagesignal may be reversed.

FIG. 21 is a block diagram of a pixel array showing pixels PIX includedin the above pixel circuit and paths of various signals. Note that WMuxis a selection circuit which outputs BW corresponding to a weightcoefficient and includes a transistor corresponding to the transistor106 illustrated in FIG. 3.

FIG. 22 shows calculation results with respect to image data (potentialX: −0.2 to 1.4 V) obtained when the weight coefficient (potential W) ischanged between 0.4 and 1.0 V. At this time, VRES was set at 1.2 V. FromFIG. 22, it was confirmed that desired calculation was possible.

Moreover, results of applying weight coefficients having directivity asillustrated in FIG. 23 to respective pixels in capturing an image of anobject having a vertical stripe pattern are shown in FIG. 24. In FIG.24, the horizontal axis represents the rotation angle (no rotation: 0°)of the vertical stripe pattern, and the vertical axis represents thedigital value after A/D conversion of the output WX. FIG. 24demonstrates that the output value is large when the direction of thevertical stripe agrees with the directivity of the weight coefficients.

From the results, it can be assumed that a pattern can be extracted froman image, and the assumption was tested. FIG. 25(A) is an image of azebra captured with a certain weight. Weight coefficients havingdirectivity in a vertical direction and weight coefficients havingdirectivity in a horizontal direction are applied to the image asillustrated in FIG. 25(A) and FIG. 25(B), respectively, and the patterndetection was tested. Note that in FIGS. 25(A) and 25(B), a positiveweight coefficient was +0.8 V, and a negative weight coefficient was−0.4 V.

FIGS. 26(A) and 26(B) show results of visualizing the extractedpatterns. FIG. 26(A) shows the result corresponding to FIG. 24(A), wherea vertical stripe pattern of the zebra is extracted. Furthermore, FIG.26(A) shows the result corresponding to FIG. 25(B), where a horizontalstripe pattern of the zebra is extracted.

In the above-described manner, it was confirmed that image processing(recognition of an image pattern) was able to be performed with oneembodiment of the present invention.

REFERENCE NUMERALS

100: pixel, 100 a: pixel, 100 b: pixel, 100 c: pixel, 100 d: pixel, 100e: pixel, 100 f: pixel, 100 g: pixel, 100 h: pixel, 101: photoelectricconversion element, 102: transistor, 103: transistor, 104: capacitor,105: transistor, 106: transistor, 107: transistor, 108: transistor, 109:transistor, 111: wiring, 111 a: wiring, 111 b: wiring, 112: wiring,112_1: wiring, 112_2: wiring, 112_4: wiring, 113: wiring, 114: wiring,115: wiring, 116: wiring, 117: wiring, 118: wiring, 119: wiring, 120:wiring, 121: wiring, 150: reference pixel, 151: light-shielding layer,153: wiring, 161: transistor, 162: transistor, 163: capacitor, 200:pixel block, 200 a: pixel block, 200 b: pixel block, 200 c: pixel block,200 d: pixel block, 200 e: pixel block, 200 f: pixel block, 201:circuit, 201 a: circuit, 201 b: circuit, 202: capacitor, 203:transistor, 204: transistor, 205: transistor, 206: transistor, 207:resistor, 210: current source circuit, 211: wiring, 212: wiring, 212_1:wiring, 212_2: wiring, 213: wiring, 213_1: wiring, 214: wiring, 214_1:wiring, 214_2: wiring, 215: wiring, 215_1: wiring, 215_2: wiring, 216:wiring, 218: wiring, 219: wiring, 220: circuit, 224: transistor, 253:transistor, 254: transistor, 261: transistor, 262: transistor, 300:pixel array, 301: circuit, 302: circuit, 303: circuit, 304: circuit,305: circuit, 306: circuit, 311: wiring, 311_1: wiring, 311_2: wiring,320: memory cell, 325: reference memory cell, 330: circuit, 340:circuit, 350: circuit, 360: circuit, 370: circuit, 410: packagesubstrate, 411: package substrate, 420: cover glass, 421: lens cover,430: adhesive, 435: lens, 440: bump, 441: land, 450: image sensor chip,451: image sensor chip, 460: electrode pad, 461: electrode pad, 470:wire, 471: wire, 490: IC chip, 531: conductive layer, 532: conductivelayer, 533: conductive layer, 534: conductive layer, 535: back gate,536: region, 540: silicon substrate, 541: insulating layer, 542:insulating layer, 543: insulating layer, 545: semiconductor layer, 546:insulating layer, 561: layer, 562: layer, 563: layer, 565 a: layer, 565b: layer, 565 c: layer, 566 a: layer, 566 b: layer, 566 c: layer, 566 d:layer, 580: insulating layer, 581: light-blocking layer, 582: organicresin layer, 583: color filter, 583 a: color filter, 583 b: colorfilter, 583 c: color filter, 584: microlens array, 585: opticalconversion layer, 586: insulating layer, 911: housing, 912: displayportion, 919: camera, 932: display portion, 933: housing also serving asa wristband, 939: camera, 951: support base, 952: camera unit, 953:protective cover, 961: housing, 962: shutter button, 963: microphone,965: lens, 967: light-emitting portion, 971: housing, 972: housing, 973:display portion, 974: operation key, 975: lens, 976: connection portion,981: housing, 982: display portion, 983: operation button, 984: externalconnection port, 985: speaker, 986: microphone, 987: camera

1. An imaging device comprising: a pixel block; a first circuit; and asecond circuit, wherein the pixel block comprises a plurality of pixelsand a third circuit, wherein the pixels and the third circuit areelectrically connected to each other through a first wiring, wherein thepixels have a function of obtaining a first signal by photoelectricconversion, wherein the pixels have a function of multiplying the firstsignal by a predetermined multiplication factor to generate secondsignals and outputting the second signals to the first wiring, whereinthe third circuit has a function of calculating a sum of the secondsignals output to the first wiring to generate a third signal andoutputting the third signal to the first circuit, and wherein the firstcircuit binarizes the third signal to generate a fourth signal andoutputs the fourth signal to the second circuit.
 2. The imaging deviceaccording to claim 1, wherein the second circuit has a function ofperforming parallel-serial conversion on the fourth signal.
 3. Theimaging device according to claim 1, wherein the second circuitcomprises a neural network which uses the fourth signal as input data.4. The imaging device according to claim 1, wherein the plurality ofpixels are arranged in a matrix and any one column is shielded fromlight.
 5. The imaging device according to claim 1, wherein the pixelseach comprise a photoelectric conversion element, a first transistor, asecond transistor, a third transistor, a fourth transistor, and a firstcapacitor, wherein one electrode of the photoelectric conversion elementis electrically connected to one of a source and a drain of the firsttransistor, wherein the other of the source and the drain of the firsttransistor is electrically connected to one of a source and a drain ofthe second transistor, wherein one of a source and a drain of the secondtransistor is electrically connected to a gate of the third transistor,wherein the gate of the third transistor is electrically connected toone electrode of the first capacitor, wherein one of a source and adrain of the third transistor is electrically connected to the firstwiring, wherein the other electrode of the first capacitor iselectrically connected to one of a source and a drain of the fourthtransistor, and wherein the first and second transistors comprise ametal oxide in their channel formation regions.
 6. The imaging deviceaccording to claim 5, further comprising: a fifth transistor; and asixth transistor, wherein a gate of the fifth transistor is electricallyconnected to the gate of the third transistor, and wherein one of asource and a drain of the fifth transistor is electrically connected toone of a source and a drain of the sixth transistor.
 7. The imagingdevice according to claim 5, wherein the third and fourth transistorscomprise silicon in their channel formation regions.
 8. The imagingdevice according to claim 1, wherein the third circuit comprises acurrent supply circuit, a seventh transistor, an eighth transistor, aninth transistor, a second capacitor, and a resistor, wherein thecurrent supply circuit is electrically connected to the first wiring,wherein the first wiring is electrically connected to one electrode ofthe second capacitor, wherein the one electrode of the second capacitoris electrically connected to one electrode of the resistor, wherein theother electrode of the second capacitor is electrically connected to oneof a source and a drain of the seventh transistor, wherein the one ofthe source and the drain of the seventh transistor is electricallyconnected to a gate of the eighth transistor, and wherein one of asource and a drain of the eighth transistor is electrically connected toone of a source and a drain of the ninth transistor.
 9. The imagingdevice according to claim 8, wherein the seventh to ninth transistorscomprise silicon in their channel formation regions.
 10. The imagingdevice according to claim 5, wherein the metal oxide comprises In, Zn,and A wherein M is Al, Ti, Ga, Sn, Y, Zr, La, Ce, Nd, or Hf.
 11. Theimaging device according to claim 5, wherein the photoelectricconversion element comprises selenium or a compound containing selenium.12. An electronic device comprising: the imaging device according toclaim 1; and a display device.